import service from ".";

const ordersApi={
    //发送axios请求
//添加
insert(cid,days,id){
      //发送axios请求
   return service.post('admin/orders',{
   
       cid:cid,
       days:days,
       id:id
     
   });
},
//删除
// delete(oid) {
//     return service.delete(`admin/orders/${oid}`);
// },
//修改
update(id){
    //发送axios请求
 return service.put(`admin/orders/${id}`);
},
//查询所有
selectOstate(pageNum,ostate){
    //发送axios请求
 return service.get('admin/orders',{
    params:{
      pageNum,
     ostate
    }
 });
},
//根据id进行查询
selectByOid(oid) {
    return service.get(`admin/orders/${oid}`);
},
selectId(pageNum,id) {
    return service.get(`admin/orders/usercars`,{
        params:{
            pageNum,
            id
        }
    });
}
};

export default ordersApi;